import request from '@/utils/request'
export function list() {
  return request({
    url: 'api/agent/selectPages',
    method: 'get'
  })
}
export function list2() {
  return request({
    url: 'api/appLog/selectPages',
    method: 'get'
  })
}
export function MailSendLigList() {
  return request({
    url: 'api/mailSendLog/selectPages',
    method: 'get'
  })
}
export function SmsSendLigList() {
  return request({
    url: 'api/smsSendLog/selectPages',
    method: 'get'
  })
}
export function list3() {
  return request({
    url: 'api/runningStateLog/selectPages',
    method: 'get'
  })
}
export function list4() {
  return request({
    url: 'api/serverInteractLog/selectPages',
    method: 'get'
  })
}

export function list5() {
  return request({
    url: 'api/warnInfoLog/selectPages',
    method: 'get'
  })
}

export function add(data) {
  return request({
    url: 'api/agentHeartbeatLog',
    method: 'post',
    data
  })
}

export function edit(data) {
  return request({
    url: 'api/agentHeartbeatLog',
    method: 'put',
    data
  })
}

export function del(data) {
  return request({
    url: 'api/agentHeartbeatLog',
    method: 'delete',
    data
  })
}
export function getHeartbeatDetail(pkId) {
  return request({
    url: 'api/agentHeartbeatLog/getHeartbeatDetail?pkId=' + pkId,
    method: 'get',
    data: pkId
  })
}

export function initMasterWarnLog(pageIndex) {
  return request({
    url: 'api/warnInfoLog/initMasterWarnLog?pageIndex=' + pageIndex,
    method: 'get'
  })
}

export default { add, list, del, edit, MailSendLigList, getHeartbeatDetail, initMasterWarnLog }
